package com.snl.micro.blog.article.dao.mapper;

import com.snl.micro.blog.article.pojo.po.ArticlePo;
import com.snl.micro.blog.common.query.ArticleQueryParam;
import com.snl.micro.blog.common.query.TagQuery;
import com.snl.micro.blog.common.vo.TagVo;

import java.util.List;

public interface ArticleMapper {
    void insertArticle(ArticlePo po);

    List<ArticlePo> query(ArticleQueryParam queryParam);

    Long selectAllArticlesByUserId(ArticleQueryParam queryParam);

    List<TagVo> selectTags(TagQuery articleId);

    Integer countLikes(Long articleId);

    Integer countHates(Long articleId);

    List<TagVo> selectAllTags(TagQuery query);

    void insertArticleAndTag(Long articleId, Long tagId);

    Long findTagByCode(Integer code);
}
